#ifndef __RTSP_SERVER_H__
#define __RTSP_SERVER_H__

#include <map>
#include <mutex>
#include <functional>
#include "Util/util.h"
#include "jsoncpp/json.h"
#include "Network/Buffer.h"

using namespace Fdt;
using namespace std;

class RtspServer{
public:
	static RtspServer* instance(){
		if(s_rtspServer == nullptr){
			lock_guard<mutex> lock(RtspServer::sm_mutex);
			s_rtspServer = new RtspServer();
		}
		return s_rtspServer;
	}

	~RtspServer(){}
	void RegistRPC();
	bool setRtspAuth(const Json::Value &request, const Fdt::BufferMap::Ptr &inMap, Json::Value &response, Fdt::BufferMap::Ptr &outMap);

protected:
	RtspServer();

private:
	static RtspServer * s_rtspServer;
	static mutex sm_mutex;

	
};
#endif